﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example03.aspx.cs" Inherits="Chapter26.Example03" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 26-3 使用 Location 对象来获取文档信息</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
</head>
<body>
    <script>
        document.writeln("<pre>");
        document.writeln("protocol: " + document.location.protocol);
        document.writeln("host: " + document.location.host);
        document.writeln("hostname: " + document.location.hostname);
        document.writeln("port: " + document.location.port);
        document.writeln("pathname: " + document.location.pathname);
        document.writeln("search: " + document.location.search);
        document.writeln("hash: " + document.location.hash);
        document.write("</pre>");
    </script>
</body>
</html>
